package cn.com.item;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 首页菜单对应的控制层方法
 * 
 * 使用注解方式 赋权  需要在springmvc中开启shiro的注解模式
 * @author Administrator
 *
 */
@Controller
@RequestMapping("/items")
public class ItemController {
	@Autowired
	ItemService itemService;
	
	@RequestMapping("/queryItems")
	@RequiresPermissions("item:query")
	public String queryItems(Model model){
		itemService.queryItems();
		return "queryItems";
	}
	
	
	@RequestMapping("/update")
	@RequiresPermissions("item:update")
	public String update(Model model){
		itemService.updateItems();
		return "update";
	}
}
